<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /* 行内元素转换为块元素 */
        span{
            display:block;
            width: 100px;
            height: 100px;
            background-color: green;
        }

        /* 块元素转换为行内元素 */
        div{
            display: inline;
            width: 100px;
            height: 100px;
            background-color: red;
        }

        /* 超链接是行内元素无法设置宽高，要设置则应转换为行内块元素 */
        a{
            display: inline-block;
            widows: 100px;
            height: 30px;
            background-color: orange;
        }
    
    </style>
</head>
<body>
    <div>块元素</div>
    <div>块元素</div>
    <span>行内元素</span>
    <span>行内元素</span>
    <a href="">阿里巴巴</a>
    <a href="">腾讯</a>
</body>
</html>